//
//  WoTableViewCell.m
//  ZhiBoYuan
//
//  Created by apple on 2018/4/16.
//  Copyright © 2018年 apple. All rights reserved.
//

#import "WoTableViewCell.h"

@implementation WoTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        [self initUI];
    }
    return self;
}

-(void)initUI{
    
    _label = [UILabel new];
    
    _label.text = @"1231313";
    _label.textColor = [UIColor blackColor];
    
    [self.contentView addSubview:_label];
    
    _label.sd_layout
    .topSpaceToView(self.contentView, SNRealValue(18))
    .leftSpaceToView(self.contentView, 20)
    .widthIs(90)
    .autoHeightRatio(0);
    
    _view = [UILabel new];
    _view.backgroundColor = [UIColor redColor];
    
    [self.contentView addSubview:_view];
    
    _view.sd_layout
    .topSpaceToView(self.contentView, 7)
    .leftSpaceToView(_label, -20)
    .widthIs(15)
    .heightIs(15);
    _view.layer.masksToBounds = YES;
    _view.layer.cornerRadius = 7.5;
    _view.font = [UIFont systemFontOfSize:10];
    _view.textColor = [UIColor whiteColor];
    _view.textAlignment = NSTextAlignmentCenter;
    
}


- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
